﻿using NicoView.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace NicoView.View
{
    /// <summary>
    /// NicoUserInfoControl.xaml の相互作用ロジック
    /// </summary>
    public partial class NicoViewUserInfoControl : UserControl,IDisposable
    {
        public NicoViewUserInfoControl()
        {
            InitializeComponent();

            UserInfoLinkClick = null;


        }



        public event Action<object, RoutedEventArgs> UserInfoLinkClick;

        public new NicoViewUserInfoViewModel DataContext
        {
            get
            {
                return (NicoViewUserInfoViewModel)base.DataContext;
            }

            set
            {
                base.DataContext = value;
                
                
            }
        }

        private void UserInfoLink_Click(object sender, RoutedEventArgs e)
        {
            
            if (UserInfoLinkClick != null) UserInfoLinkClick(sender, e);
        }



        public void Dispose()
        {
            this.UserInfoLinkClick = null;

            this.DataContext.Dispose();

        }
    }
}
